export type Gender = 'famale' | 'male';

export interface User {
  id: [string, number];
  name: string;
  avatar?: string; //头像
  cover?: string;  ///封面
  address?: string;
  gender?: Gender;
}

export interface ToolBar {
  icon: string;
  title: string;
  unReadCount?: number
}

export type ToolBars = Array<ToolBar>;

export interface ToolButton {
  icon: string;
  title?: string;
}

export type ToolButtons = Array<ToolButton>;

export interface Box {
  top: number;
  left: number;
}

//点赞声明
export interface Praise {
  id: [number, string],
  user: User;
  create_at: string;
}

//评论声明
export interface Comment {
  id: [number, string],
  content: string;
  user: User;
  create_at: string;
}

//朋友圈列表数据声明
export interface CircleInterface {
  id: [number, string],
  content: string;
  create_at: string;
  user: User;
  praises: Array<Praise>;
  comments: Array<Comment>;
}

export interface ResponseList {
  total: number;
  list : Array<Object>
}

//响应结构体
export interface Response {
  code: string;
  msg: string;
  data: Object | ResponseList;
}

export type FetcRequest = () => Promise<Response>;